export default class Food {
    element: HTMLElement;

    constructor() {
      this.element = document.getElementById('food')!;
    }

    get X() {
      return this.element.offsetLeft;
    }

    get Y() {
      return this.element.offsetTop;
    }

    change() {
      const X: number = Math.round(Math.random() * 29) * 10;
      const Y: number = Math.round(Math.random() * 29) * 10;
      this.element.style.left = `${X}px`;
      this.element.style.top = `${Y}px`;
    }
}
